package Leo.serviceClient.ribbon;

import Leo.serviceClient.ribbon.LoadBalanceRuleImpl;
import com.netflix.loadbalancer.BestAvailableRule;
import com.netflix.loadbalancer.IPing;
import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.PingUrl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class RibbonConfig {

//    @Autowired
//    LoadBalanceRuleImpl rule;
//
//    @Autowired
//    PingImpl ping;

    @Bean
    public BestAvailableRule getRule(){
        return new BestAvailableRule();
    }

    @Bean
    public PingUrl getPing(){
        return new PingUrl();
    }

}
